/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package MobileArchitecture.util;

import MobileArchitecture.Attribute;
import MobileArchitecture.GeolocatedAttribute;
import MobileArchitecture.Mobile;
import MobileArchitecture.MobileArchitecturePackage;
import MobileArchitecture.MobileEntity;
import MobileArchitecture.MobilePresentationModel;
import MobileArchitecture.MobileView;
import MobileArchitecture.MobileViewModel;
import MobileArchitecture.NamedElement;
import MobileArchitecture.Server;
import MobileArchitecture.ServerBO;
import MobileArchitecture.ServerDAO;
import MobileArchitecture.ServerEntity;
import MobileArchitecture.ServerService;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see MobileArchitecture.MobileArchitecturePackage
 * @generated
 */
public class MobileArchitectureSwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static MobileArchitecturePackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MobileArchitectureSwitch() {
		if (modelPackage == null) {
			modelPackage = MobileArchitecturePackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @parameter ePackage the package in question.
	 * @return whether this is a switch for the given package.
	 * @generated
	 */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
		return ePackage == modelPackage;
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case MobileArchitecturePackage.NAMED_ELEMENT: {
				NamedElement namedElement = (NamedElement)theEObject;
				T result = caseNamedElement(namedElement);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.SYSTEM: {
				MobileArchitecture.System system = (MobileArchitecture.System)theEObject;
				T result = caseSystem(system);
				if (result == null) result = caseNamedElement(system);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.SERVER: {
				Server server = (Server)theEObject;
				T result = caseServer(server);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.SERVER_ENTITY: {
				ServerEntity serverEntity = (ServerEntity)theEObject;
				T result = caseServerEntity(serverEntity);
				if (result == null) result = caseNamedElement(serverEntity);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.SERVER_SERVICE: {
				ServerService serverService = (ServerService)theEObject;
				T result = caseServerService(serverService);
				if (result == null) result = caseNamedElement(serverService);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.SERVER_DAO: {
				ServerDAO serverDAO = (ServerDAO)theEObject;
				T result = caseServerDAO(serverDAO);
				if (result == null) result = caseNamedElement(serverDAO);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.SERVER_BO: {
				ServerBO serverBO = (ServerBO)theEObject;
				T result = caseServerBO(serverBO);
				if (result == null) result = caseNamedElement(serverBO);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.MOBILE: {
				Mobile mobile = (Mobile)theEObject;
				T result = caseMobile(mobile);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.MOBILE_ENTITY: {
				MobileEntity mobileEntity = (MobileEntity)theEObject;
				T result = caseMobileEntity(mobileEntity);
				if (result == null) result = caseNamedElement(mobileEntity);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.MOBILE_VIEW: {
				MobileView mobileView = (MobileView)theEObject;
				T result = caseMobileView(mobileView);
				if (result == null) result = caseNamedElement(mobileView);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.MOBILE_VIEW_MODEL: {
				MobileViewModel mobileViewModel = (MobileViewModel)theEObject;
				T result = caseMobileViewModel(mobileViewModel);
				if (result == null) result = caseNamedElement(mobileViewModel);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.MOBILE_PRESENTATION_MODEL: {
				MobilePresentationModel mobilePresentationModel = (MobilePresentationModel)theEObject;
				T result = caseMobilePresentationModel(mobilePresentationModel);
				if (result == null) result = caseNamedElement(mobilePresentationModel);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.ATTRIBUTE: {
				Attribute attribute = (Attribute)theEObject;
				T result = caseAttribute(attribute);
				if (result == null) result = caseNamedElement(attribute);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case MobileArchitecturePackage.GEOLOCATED_ATTRIBUTE: {
				GeolocatedAttribute geolocatedAttribute = (GeolocatedAttribute)theEObject;
				T result = caseGeolocatedAttribute(geolocatedAttribute);
				if (result == null) result = caseAttribute(geolocatedAttribute);
				if (result == null) result = caseNamedElement(geolocatedAttribute);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Named Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Named Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseNamedElement(NamedElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>System</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>System</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseSystem(MobileArchitecture.System object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Server</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Server</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseServer(Server object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Server Entity</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Server Entity</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseServerEntity(ServerEntity object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Server Service</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Server Service</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseServerService(ServerService object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Server DAO</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Server DAO</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseServerDAO(ServerDAO object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Server BO</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Server BO</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseServerBO(ServerBO object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Mobile</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Mobile</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMobile(Mobile object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Mobile Entity</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Mobile Entity</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMobileEntity(MobileEntity object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Mobile View</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Mobile View</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMobileView(MobileView object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Mobile View Model</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Mobile View Model</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMobileViewModel(MobileViewModel object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Mobile Presentation Model</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Mobile Presentation Model</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMobilePresentationModel(MobilePresentationModel object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Attribute</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Attribute</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAttribute(Attribute object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Geolocated Attribute</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Geolocated Attribute</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseGeolocatedAttribute(GeolocatedAttribute object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //MobileArchitectureSwitch
